package com.lite.business.service.accessory;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lite.business.entity.accessory.Accessory;
import com.lite.business.exception.BusinessException;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author stranger
 * @since 2022-10-25
 */
public interface AccessoryService extends IService<Accessory> {


    /**
     * 获取一个附属品的信息
     */
    Accessory getAccessoryInfoById(Integer cmoId, Integer accessoryId) throws BusinessException;

    /**
     * 分页列出附属商品
     *
     * @param cmodId 商品ID
     * @param page   页数
     * @param size   容量
     * @return 对于页的附属品列表
     */
    List<Accessory> listAccessoryByPage(Integer cmodId, Integer page, Integer size) throws BusinessException;

    /**
     * 更新一个附属品的信息
     */
    Boolean updateAccessoryInfoById(Integer cmodId, Integer accessoryId, Accessory newAccessory) throws BusinessException;

    /**
     * 删除一个附属品的信息
     */
    Boolean removeAccessoryInfoById(Integer cmodId, Integer accessoryId) throws BusinessException;

    /**
     * 新增一个附属品的信息
     */
    Boolean addAccessoryInfo(Accessory accessory) throws BusinessException;
}
